<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>初心博客后台管理系统</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/css/admin.css" rel="stylesheet">
</head>

<body>
    <div class="lyear-layout-web">
        <div class="lyear-layout-container">
               <!--左侧导航-->
               <% include sliderBar%>
               <!--End 左侧导航-->
               
               <!--头部信息-->
               <% include headerBar%>
               <!--End 头部信息-->

            <!--页面主要内容-->
            <main class="lyear-layout-content">

                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="card">

                                <div class="card-header">
                                    <h4>编辑用户</h4>
                                </div>
                                <div class="card-body">

                                    <form class="form-horizontal" action="/admin/edit" method="post">
                                        <input class="form-control" type="hidden"  name="userId"  value="<%=editUser.userId%>">
                                        <div class="form-group">
                                            <label class="col-md-3 control-label" for="username">用户名</label>
                                            <div class="col-md-3">
                                                <input class="form-control" type="text" id="example-hf-email" name="username" value="<%=editUser.username%>" placeholder="请输入用户名">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label" for="password">密码</label>
                                            <div class="col-md-3">
                                                <input class="form-control" type="password" id="example-hf-password" name="password" value="<%=editUser.password%>" placeholder="请输入密码">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-3 control-label" for="email">邮箱</label>
                                            <div class="col-md-3">
                                                <input class="form-control" type="text" id="email" name="email" placeholder="请输入邮箱" value="<%=editUser.email%>">
                                            </div>
                                        </div>
                                        <div class="form-group ">
                                            <label class="col-md-3 control-label" for="status">状态</label>
                                            <div class="col-md-3" style="margin-top: 7px;">
                                             <%   if(editUser.status){ %>
                                                    <label class="lyear-radio radio-inline radio-primary" style="padding-top: 0px;">
                                                            <input type="radio" name="status" value="0"><span>禁用</span>
                                                          </label>
                                                          <label class="lyear-radio radio-inline radio-primary" style="padding-top: 0px;">
                                                            <input type="radio" name="status" value="1" checked=""><span>启用</span>
                                                    </label>
                                             <%   }else{ %>
                                                    <label class="lyear-radio radio-inline radio-primary" style="padding-top: 0px;">
                                                            <input type="radio" name="status" value="0"checked=""><span>禁用</span>
                                                          </label>
                                                          <label class="lyear-radio radio-inline radio-primary" style="padding-top: 0px;">
                                                            <input type="radio" name="status" value="1" ><span>启用</span>
                                                    </label>
                                               <% } %>
                                                
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-md-9 col-md-offset-3">
                                                <button class="btn btn-primary" type="submit">修改</button>
                                                <a href="/admin/user" class="btn btn-default" style="margin-left: 20px;">取消</a>
                                            </div>
                                        </div>
                                    </form>

                                </div>


                            </div>
                        </div>

                    </div>

                </div>

            </main>
            <!--End 页面主要内容-->
        </div>
    </div>

    <script type="text/javascript" src="/plugins/jquery/jquery-3.4.0.min.js"></script>
    <script type="text/javascript" src="/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
    <script src="/plugins/bootstrapPager.js"></script>
    <script type="text/javascript" src="/js/main.min.js"></script>
    <script>
        //后台用户页面
        var pagehtml = Pager({
            totalCount: 30, //总条数为150
            pageSize: 5, //每页显示6条内容，默认10
            buttonSize: 6, //显示6个按钮，默认10
            pageParam: 'page', //页码的参数名为'p'，默认为'page'
            className: 'pagination', //分页的样式
            prevButton: '上一页', //上一页按钮
            nextButton: '下一页', //下一页按钮
            firstButton: '首页', //第一页按钮
            lastButton: '末页', //最后一页按钮
        })
        $('.pagebox').html(pagehtml)
    </script>
</body>

</html>